package kr.hkit.PowerJava.chapter22;

public class GenericEx {
public static void main(String[] args) {
	/*   Box b = new Box();
	   b.setData(5);
	   b.setData("Hello Java");
	   
	   int data =(int) b.getData();
	   System.out.println(data);*/

       GenericBox<Integer> gb = new GenericBox<>();
       gb.setData(5);
       System.out.println(gb.getData());
       
       GenericBox<String> gbStr = new GenericBox<>();
       gbStr.setData("Test Generic");
       String str = gbStr.getData();
       System.out.println(str);

}
}
